const String tableOrder = 'bt_order';
const String columnGoodsCode = 'goods_code';
const String columnGoodsName = 'goods_name';
const String columnOrderNo = 'order_no';
const String columnPayAmount = 'pay_amount';
const String columnPaidAmount = 'paid_amount';
const String columnPaidCurrency = 'paid_currency';

class BtOrder {
  late String goodsCode;
  late String goodsName;
  late String orderNo;
  late String payAmount;
  late String paidAmount;
  late String paidCurrency;

  BtOrder({
    required this.goodsCode,
    required this.goodsName,
    required this.orderNo,
    required this.payAmount,
    required this.paidAmount,
    required this.paidCurrency,
  });

  Map<String, dynamic> toMap() {
    var map = <String, dynamic>{};
    map[columnGoodsCode] = goodsCode;
    map[columnGoodsName] = goodsName;
    map[columnOrderNo] = orderNo;
    map[columnPayAmount] = payAmount;
    map[columnPaidAmount] = paidAmount;
    map[columnPaidCurrency] = paidCurrency;
    return map;
  }

  BtOrder.fromMap(Map<String, dynamic> map) {
    goodsCode = map[columnGoodsCode];
    goodsName = map[columnGoodsName];
    orderNo = map[columnOrderNo];
    payAmount = map[columnPayAmount];
    paidAmount = map[columnPaidAmount];
    paidCurrency = map[columnPaidCurrency];
  }
}
